<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>论坛_<?= $web_titles ?></title>
<meta name="Keywords" content="<?= $web_keywords ?>" />
<meta name="Description" content="<?= $web_description ?>" />
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/sq.css"/>
<script type="text/javascript" src="js/baidutongji.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--header begin-->
	<? include("_include.top.navbar.php") ?>
    <!--header end-->
    <!--banner begin-->
    <div class="sq-banner">
        <div class="inner-pic"><img src="images/sq_ban.jpg" alt=""/></div>
        <div class="sq-inner">
            <div class="search-box">
			<!--<form name="SearchForm" id="SearchForm" method="post" action="active_search.php">
                <input type="text" class="search-text input_wby" holdplace="搜索目的地/攻略/活动" name="search_text"/>
                <input type="submit" class="search-send" value="搜索"/>
			</form>-->
            </div>
            <div class="sq-1">
				<?php
						if($_SESSION['kboy_userid']){
							echo "<a href=\"forum_travel_add.php?uid=".$_SESSION['kboy_userid']."\">我要发贴</a>";
						}else{
							echo "<a href=\"login.php\">我要发贴</a>";
						}
				?>
            </div>
            <div class="sq-1"><a href="user_index.php">个人中心</a></div>
        </div>
    </div>
    <!--banner end-->
    <!--活动 begin-->
    <!--<div class="f-item-box">
        <div class="content">
            <div class="sq-standard">
                <div class="sq-l">
                    <ul class="pic">
						<?php
								$news_sql = "select * from kboy_piclink where news_bigclass=126 order by news_top desc,news_order desc, id desc limit 5";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
									if($news_rs['news_tourls']){
										echo "<li><a href=\"".$news_rs['news_tourls']."\" target=\"_blank\"><img src=\"".$news_rs['news_pic']."\" width=\"870\" height=\"432\"></a></li>";
									}else{
										echo "<li><a href=\"javascript:void(0);\"><img src=\"".$news_rs['news_pic']."\" width=\"870\" height=\"432\"></a></li>";
									}
								}
						?>
                    </ul>
                    <div class="txt-bg"></div>
                    <div class="txt">
                        <ul>
						<?php
								$news_sql = "select * from kboy_piclink where news_bigclass=126 order by news_top desc,news_order desc, id desc limit 5";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
									if($news_rs['news_tourls']){
										echo "<li><a href=\"".$news_rs['news_tourls']."\" target=\"_blank\">".$news_rs['news_title']."</a></li>";
									}else{
										echo "<li><a href=\"javascript:void(0);\">".$news_rs['news_title']."</a></li>";
									}
								}
						?>
                        </ul>
                    </div>
                    <ul class="num">
						<?php
								$i = 1;
								$news_sql = "select * from kboy_piclink where news_bigclass=126 order by news_top desc,news_order desc, id desc limit 5";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
									if($i == 1){
										echo "<li class=\"on\"></li>";
									}else{
										echo "<li></li>";
									}
								$i ++ ;
								}
						?>
                    </ul>
                </div>
                <div class="sq-r">
                    <ul>
						<?php
								$i = 1;
								$news_sql = "select * from kboy_forum_travel order by id desc limit 6";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
									if($i == 1){
										echo "<li class=\"on\">";
									}else{
										echo "<li>";
									}
									echo "<a href=\"forum_travelview.php?newsid=".$news_rs['id']."\" target=\"_blank\"><i><img src=\"".getClassName("kboy_user","user_face","uid=".$news_rs['uid'])."\" width=\"55\" height=\"55\" alt=\"\"/></i>".$news_rs['travel_title']."</a></li>";
								$i ++ ;	
								}
						?>
                    </ul>
                </div>
            </div>
        </div>
    </div>-->
    <div class="f-item-box">
        <div class="content">
            <div class="f-item-title">
                <p class="tips">COMMUNITY DYNAMIC</p>
                <div class="title-in">
                    <span class="sprite_l"></span>
                    <a href="javascript:;">社区动态</a>
                    <span class="sprite_r"></span>
                </div>
            </div>
            <div class="hd-nav-wrap">
                <ul class="hd-nav">
                    <li class="on"><a href="javascript:;">本周热门</a></li>
                    <li><a href="javascript:;">最新帖子</a></li>
                    <!--<li><a href="javascript:;">最新活动</a></li>-->
                    <li><a href="javascript:;">游记攻略</a></li>
                </ul>
            </div>
            <div class="bd-content pt35">
                <div class="con-pane on">
                    <div class="con-f1">
                        <div class="community-f1">
                            <ul>
						<?php
								$date=date('Y-m-d');  //当前日期

                                        $first=1; //$first =1 表示每周星期一为开始日期 0表示每周日为开始日期

                                        $w=date('w',strtotime($date));  //获取当前周的第几天 周日是 0 周一到周六是 1 - 6 

                                        $now_start=date('Y-m-d',strtotime("$date -".($w ? $w - $first : 6).' days')); //获取本周开始日期，如果$w是0，则表示周日，减去 6 天

                                        $now_end=date('Y-m-d',strtotime("$now_start +6 days"));  //本周结束日期



                                        $news_sql = "select * from kboy_forum_travel where (date(travel_addtime)>='$now_start' and date(travel_addtime)<='$now_end') order by travel_hit desc limit 6";
										
                                        $news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
						?>
                                <li>
                                    <a href="forum_travelview.php?newsid=<?=$news_rs['id']?>" target="_blank">
                                        <div class="c-f">
                                            <div class="c-pic">
                                                <img src="<?=$news_rs['travel_pic']?>" width="373" height="234" alt=""/>
                                                <div class="nums"><span><i></i><?=$news_rs['travel_hit']?></span><span><i></i><?=$news_rs['travel_best']?></span></div>
                                            </div>
                                            <div class="c-tips"><i class="tx"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['uid'])?>" width="55" height="55" alt=""/></i><p><?=$news_rs['travel_title']?></p></div>
                                        </div>
                                    </a>
                                </li>
						<?php
								}
						?>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="con-pane">
                    <div class="con-f1">
                        <div class="community-f1">
                            <ul>
						<?php
								$news_sql = "select * from kboy_forum_travel order by travel_addtime desc limit 6";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
						?>
                                <li>
                                    <a href="forum_travelview.php?newsid=<?=$news_rs['id']?>" target="_blank">
                                        <div class="c-f">
                                            <div class="c-pic">
                                                <img src="<?=$news_rs['travel_pic']?>" width="373" height="234" alt=""/>
                                                <div class="nums"><span><i></i><?=$news_rs['travel_hit']?></span><span><i></i><?=$news_rs['travel_best']?></span></div>
                                            </div>
                                            <div class="c-tips"><i class="tx"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['uid'])?>" width="55" height="55" alt=""/></i><p><?=$news_rs['travel_title']?></p></div>
                                        </div>
                                    </a>
                                </li>
						<?php
								}
						?>
                            </ul>
                        </div>
                    </div>
                </div>
                <!--<div class="con-pane">
                    <div class="con-f1">
                        <div class="community-f1">
                            <ul>
						<?php
								$news_sql = "select * from kboy_forum_active where 1 order by id desc limit 3";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
						?>
                                <li>
                                    <a href="activeview.php?newsid=<?=$news_rs['id']?>" target="_blank">
                                        <div class="c-f">
                                            <div class="c-pic">
                                                <img src="<?=$news_rs['active_pic']?>" width="373" height="234" alt=""/>
                                                <div class="nums"><span><i></i><?=$news_rs['active_hit']?></span><span><i></i>17</span></div>
                                            </div>
                                            <div class="c-tips"><i class="tx"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['uid'])?>" width="55" height="55" alt=""/></i><p><?=$news_rs['active_title']?></p></div>
                                        </div>
                                    </a>
                                </li>
						<?php
								}
						?>
                            </ul>
                        </div>
                    </div>
                </div>-->
                <div class="con-pane">
                    <div class="con-f1">
                        <div class="community-f1">
                            <ul>
						<?php
								$news_sql = "select * from kboy_forum_travel where travel_bigclass = 124 order by id desc limit 6";
								$news_rows = mysql_query($news_sql);
								while($news_rs = mysql_fetch_array($news_rows)){
						?>
                                <li>
                                    <a href="forum_travelview.php?newsid=<?=$news_rs['id']?>" target="_blank">
                                        <div class="c-f">
                                            <div class="c-pic">
                                                <img src="<?=$news_rs['travel_pic']?>" width="373" height="234" alt=""/>
                                                <div class="nums"><span><i></i><?=$news_rs['travel_hit']?></span><span><i></i><?=$news_rs['travel_best']?></span></div>
                                            </div>
                                            <div class="c-tips"><i class="tx"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['uid'])?>" width="55" height="55" alt=""/></i><p><?=$news_rs['travel_title']?></p></div>
                                        </div>
                                    </a>
                                </li>
						<?php
								}
						?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="f-item-box">
        <div class="content">
            <div class="f-item-title">
                <p class="tips">COMMUNITY BBS</p>
                <div class="title-in">
                    <span class="sprite_l"></span>
                    <a href="javascript:;">社区论坛</a>
                    <span class="sprite_r"></span>
                </div>
            </div>
            <div class="bd-content">
                <div class="bbs-con mdd-con">
                    <div class="bbs-con-l">
					
						<?php
								$bigclass_sql = "select * from kboy_bigclass where pid=115 order by bigclass_order asc, id asc";
								$bigclass_rows = mysql_query($bigclass_sql);
								while($bigclass_rs = mysql_fetch_array($bigclass_rows)){
						?>
                        <div class="bbs-item" id="b-hd-1">
                            <div class="title"><?=$bigclass_rs['bigclass_cn']?></div>
                            <div class="bbs-bd">
						<?php
								$secclass_sql = "select * from kboy_bigclass where pid=".$bigclass_rs['id']." order by bigclass_order asc, id asc";
								$secclass_rows = mysql_query($secclass_sql);
								while($secclass_rs = mysql_fetch_array($secclass_rows)){
						?>
                                <dl>
                                    <dt><a href="bbslist.php?classid=<?=$secclass_rs['id']?>" target="_blank"><img src="<?=$secclass_rs['bigclass_pic']?>" width="350" height="260" alt=""/></a></dt>
                                    <dd>
                                        <div class="bbs-name"><a href="bbslist.php?classid=<?=$secclass_rs['id']?>" target="_blank"><?=$secclass_rs['bigclass_cn']?> </a></div>
                                        <div class="bbs-bg"><?=$secclass_rs['bigclass_text']?></div>
                                        <div class="bbs-ms"><span class="wr"><i></i><?=getNewsNums("kboy_forum_travel","travel_bigclass=".$secclass_rs['id']);?></span></div>
                                    </dd>
                                </dl>
						<?php
								}
						?>
								
                            </div>
                        </div>
						<?php
								}
						?>
						
                    </div>
                    <!--右侧跟随导航-->
                    <!--<div class="side-catalog">
                        <div class="side-bar"></div>
                        <div class="catalog-scroller">
                            <ul>
						<?php
								$bigclass_sql = "select * from kboy_bigclass where pid=115 order by bigclass_order asc, id asc";
								$bigclass_rows = mysql_query($bigclass_sql);
								$i = 1;
								while($bigclass_rs = mysql_fetch_array($bigclass_rows)){
						?>
                                <li class="catalog-title">
                                    <em class="pointer"></em>
                                    <span class="text"><a href="#b-hd-<?=$i?>"><?=$bigclass_rs['bigclass_cn']?></a></span>
                                </li>
						<?php
								$i ++ ;
								}
						?>
                                <li class="catalog-title catalog-send">
				<?php
						if($_SESSION['kboy_userid']){
							echo "<a href=\"forum_travel_add.php?uid=".$_SESSION['kboy_userid']."\">我要发贴</a>";
						}else{
							echo "<a href=\"login.php\">我要发贴</a>";
						}
				?>
								</li>
                            </ul>
                        </div>
                    </div>-->
                </div>
            </div>
        </div>
    </div>
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <!--左侧悬浮 begin-->
	<? include("_include.bottom.leftbar.php") ?>
    <!--左侧悬浮 end-->
    <!--右侧悬浮导航 begin-->
	<? include("_include.bottom.rightbar.php") ?>
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/sq.js"></script>
</body>
</html>

